Closed
Conversation
新增可折叠的统计图表面板,包含: - 每个 API Key 的请求次数趋势折线图 - 每个 API Key 的 Token 使用趋势折线图 - 每个 API Key 的费用趋势折线图 - 模型使用分布水平堆叠百分比条形图 - 支持小时/日/月粒度切换 后端新增两个接口(不修改原有接口): - GET /api/v1/usage/dashboard/api-key-trend - GET /api/v1/usage/dashboard/api-key-model-distribution
Author
|
新增针对API-Key的统计图表面板,包含: |
…t_test stubUsageLogRepo was missing the GetAPIKeyModelDistribution method added to UsageLogRepository interface, causing build failure.
- replace global unique constraint on api_keys.key with a partial unique index (WHERE deleted_at IS NULL) - remove Unique() from ent schema field and regenerate ent/migrate/schema.go - add migration 071 to drop the old constraint and create the partial index - add integration test TestCreateAfterDelete_SameKey to cover the regression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增可折叠的统计图表面板,包含:
后端新增两个接口(不修改原有接口):